﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FaceSharp.Api;
using FaceSharp.Api.Types;
using FaceSharp.MVC.Code.Facebook;

namespace FaceSharp.MVC.Code.Facebook
{
    public class FacebookCoreAsync : IFacebookCore
    {
        private readonly string _applicationId;
        private readonly string _applicationSecret;
        private readonly string _applicationUrl;
        private readonly string _extendedPermissions;

        public FacebookCoreAsync(IFacebookCore facebookCore)
        {
            _applicationId = facebookCore.ApplicationId;
            _applicationSecret = facebookCore.ApplicationSecret;
            _applicationUrl = facebookCore.ApplicationUrl;
            _extendedPermissions = facebookCore.ExtendedPermissions;
            this.CurrentUser = facebookCore.CurrentUser;
            this.Code = facebookCore.Code;
            this.AccessToken = facebookCore.AccessToken;
            this.AccessTokenExpirationDate = facebookCore.AccessTokenExpirationDate;
            this.SignedRequest = facebookCore.SignedRequest;
        }

        public string ApplicationId { get { return _applicationId; } }
        public string ApplicationSecret { get { return _applicationSecret; } }
        public string ApplicationUrl { get { return _applicationUrl; } }
        public string ExtendedPermissions { get { return _extendedPermissions; } }

        public User CurrentUser { get; set; }
        public string Code { get; set; }
        public string AccessToken { get; set; }
        public DateTime? AccessTokenExpirationDate { get; set; }
        public SignedRequest SignedRequest { get; set; }
    }
}